<?php TPL::output('admin/admin_header.tpl.htm'); ?>

<body >

<div id="body-wrapper">
	<div id="main-content">
		<div class="clear"></div>
		<div class="content-box">
			<div class="content-box-header">
				<h3><?php echo $this->crumb['last']['name']; ?></h3>
				<ul class="content-box-tabs">
				</ul>
				<div class="clear"></div>
			</div>
			<div class="content-box-content">
				<div class="tab-content default-tab" id="tab1">
					
					
					<form id="batchs_form" action="admin/answer/batch/" method="post">
					<?php if(!$this->list){ ?>
					<div class="notification attention png_bg"> <a href="#" class="close"><img src="<?php echo G_STATIC_URL;?>/admin/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
						<div>
						<?php if($this->keyword){ ?> 搜索不到与&nbsp;<?php echo $this->keyword; ?>&nbsp;相关的内容， 返回<a href="javascript:;" onClick="$('#keyword').val('');$('#_search_form').submit();">显示全部</a>
						<?php }else{ ?>
							没有回复
						<?php } ?>
						</div>
					</div>
					<?php }else{ ?>
					<table>
						<thead>
							<tr>
								<th style="width:20px;"><input type="checkbox" class="check-all"></th>
								<th style="width:380px;">回复内容</th>
								<th>作者</th>
								<th>发表时间</th>
								<th>赞同</th>
								<th>感谢</th>
								<th>评论</th>
								<th>没有帮助</th>
								<!--th>操作</th-->
							</tr>
						</thead>
						<tfoot>
							<tr>
								<td colspan="7">
								
								<div class="bulk-actions align-left">
										<select name="batch_action">
											<option value="">选择操作</option>
											<option value="delete">批量删除</option>
										</select>
										<a class="button" onClick="ajax_post($('#batchs_form'), _ajax_post_alert_processer); return false;" href="javascript:;">批量执行操作</a>
								</div>
									
									<div class="pagination">
										<?php echo $this->pagination; ?>
									</div>
									
									<div class="clear"></div>
									
									</td>
							</tr>
						</tfoot>
						<tbody>
        <?php foreach ($this->list AS $key => $val) { ?>
							<tr>
								<td><input type="checkbox" name="answer_ids[]" value="<?php echo $val['answer_id']; ?>"></td>
								<td><a href="question/id-<?php echo $val['question_id']; ?>__item_id-<?php echo $val['answer_id']; ?>#answers" title="查看问题" target=_blank><?php echo $val['answer_content']; ?></a></td>
								<td><a href="people/<?php echo $val['uname']; ?>" target="_blank"><?php echo $val['uname']; ?></a></td>
								<td><?php echo date("Y-m-d H:i:s", $val['add_time']); ?></td>
								<td><?php echo $val['agree_count']; ?></td>
								<td><?php echo $val['thanks_count']; ?></td>
								<td><?php echo $val['comment_count']; ?></td>
								<td><?php echo $val['uninterested_count']; ?></td>
							</tr>
        <?php } ?>
						</tbody>
					</table>
					<?php } ?>
					</form>
				</div>
		</div>
		
		<div class="clear"></div>
		<div id="notf_tip" style="display:none;" class="notification png_bg"> <a href="javascript:;" class="close"><img src="<?php echo G_STATIC_URL;?>/admin/images/icons/cross_grey_small.png" alt="关闭" /></a>
			<div id="notf_cont"></div>
		</div>
		
	</div>
</div>


<?php TPL::output('admin/admin_footer.tpl.htm'); ?>